const Mock = require('mockjs');

// 列表
Mock.mock('/system/deviceList', 'get', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": {
    "content": [{
      "id": "16739222421508096",
      "createBy": "",
      "createTime": "2018-06-06 18:48:02",
      "updateBy": "",
      "updateTime": "2018-06-06 18:57:55",
      "delFlag": 0,
      "code": "1",
      "name": 100,
      "unit": "台",
      "cnt": 1,
      "brand": "西门子",
      "producer": "西门子中国有限公司",
      "ownerUid": "S001",
      "position": "热处理工厂一分厂",
      "remark": "备注"
    }],
    "pageable": {
      "offset": 0,
      "pageSize": 10,
      "pageNumber": 0,
    },
    "totalElements": 4,
    "totalPages": 1,
    "size": 10,
  }
});

//   保存
Mock.mock('system/saveDevice', 'post', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535167163850
});

//   修改
Mock.mock('/system/deviceInfo', 'get', {
  "success": true,
  "message": "success",
  "code": 200,
  "timestamp": 1535082178117,
  "result": {
    "id": "4363087427670016",
    "createBy": "",
    "createTime": "2018-05-03 15:09:42",
    "updateBy": "",
    "updateTime": "2018-06-06 18:58:25",
    "delFlag": 0,
    "code": "1",
    "name": 100,
    "unit": "台",
    "cnt": 1,
    "brand": "西门子",
    "producer": "西门子中国有限公司",
    "ownerUid": "S001",
    "position": "热处理工厂一分厂",
    "remark": "备注"
  }
});
